<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html;charset=utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>当当图书 – 全球最大的中文网上书店</title>
    <link href="../css/book.css" rel="stylesheet" type="text/css"/>
    <link href="../css/second.css" rel="stylesheet" type="text/css"/>
    <link href="../css/secBook_Show.css" rel="stylesheet" type="text/css"/>
    <link href="../css/list.css" rel="stylesheet" type="text/css"/>
</head>
<body>
&nbsp;

<!-- 头部开始 -->
<%@include file="../common/head.jsp" %>
<!-- 头部结束 -->

<div style="width: 962px; margin: auto;">
    <a href="#"><img src="../images/default/book_banner_081203.jpg" border="0"/> </a>
</div>
<div class='your_position'>
    您现在的位置:&nbsp;
    <c:if test="${isCateFirst==0}">
    <a href='#'>当当图书</a> ${catename}&gt;&gt${message.cname}
    </c:if>
    <c:if test="${isCateFirst==1}">
        <a href='#'>当当图书</a> ${message.cname}&gt;&gt
    </c:if>
    <font style='color: #cc3300'><strong>小说</strong> </font>
</div>

<div class="book">

    <!--左栏开始-->
    <div id="left" class="book_left">
        <div id="__fenleiliulan">
            <div class=second_l_border2>
                <h2>
                    分类浏览
                </h2>
                <ul>
                    <li>
                        <div>
                            <div class=second_fenlei>
                                &middot;全部&nbsp;(<span id="sum"></span>)
                            </div>
                        </div>
                    </li>
                    <div class="clear"></div>

                    <!--2级分类开始-->
                    <c:forEach items="${categories}" var="cate">
                        <li>
                            <div>
                                <div class=second_fenlei>
                                    &middot
                                </div>
                                <div class=second_fenlei>
                                    <a href="#">${cate.cname}&nbsp;(<span class="quzhi">${cate.cateSum}</span>)</a>
                                </div>
                            </div>
                        </li>

                        <div class="clear"></div>

                        <!--2级分类结束-->
                    </c:forEach>
                    <li>
                        <div></div>
                    </li>
                </ul>
            </div>
        </div>
    </div>

    <!--左栏结束-->

    <!--中栏开始-->
    <div class="book_center">

        <!--图书列表开始-->
        <div id="divRight" class="list_right">

            <div id="book_list" class="list_r_title">
                <div id="divTopPageNavi" class="list_r_title_text3">

                    <!--分页导航开始-->

                    <div class='list_r_title_text3a'>

                        <c:if test="${page.isFirstPage==false}">
                            <c:if test="${isCateFirst==0}">
                                <a name=link_page_next
                                   href="${pageContext.request.contextPath}/mains/mains_pageList?pageIndex=${page.prePage}&cid=${cid}&isCateFirst=0">


                                    <img src='${pageContext.request.contextPath}/images/page_up.gif'/> </a>
                            </c:if>
                            <c:if test="${isCateFirst==1}">
                                <a name=link_page_next
                                   href="${pageContext.request.contextPath}/mains/mains_pageList?pageIndex=${page.prePage}&cid=${cid}">
                                    <img src='${pageContext.request.contextPath}/images/page_up.gif'/> </a>
                            </c:if>
                        </c:if>

                    </div>
                    <c:if test="isFirstPage">
                        <div class='list_r_title_text3a'>
                            <img src='${pageContext.request.contextPath}/images/page_up_gray.gif'/>
                        </div>
                    </c:if>
                    <div class='list_r_title_text3b'>
                        第${pageIndex}页/共${page.pages}页
                    </div>

                    <div class='list_r_title_text3a'>
                        <%--								<c:forEach items="${cate}" var="cate">--%>
                        <%--									<c:forEach items="${cate.category}" var="c">--%>
                        <c:if test="${page.isLastPage==false}">
                            <c:if test="${isCateFirst==0}">
                                <a name=link_page_next
                                   href="${pageContext.request.contextPath}/mains/mains_pageList?pageIndex=${page.nextPage}&cid=${cid}&isCateFirst=0">
                                    <img src='${pageContext.request.contextPath}/images/page_down.gif'/> </a></c:if>
                            <c:if test="${isCateFirst==1}">
                                <a name=link_page_next
                                   href="${pageContext.request.contextPath}/mains/mains_pageList?pageIndex=${page.nextPage}&cid=${cid}">
                                    <img src='${pageContext.request.contextPath}/images/page_down.gif'/> </a>
                            </c:if>
                        </c:if>
                    </div>

                    <c:if test="${page.isLastPage}">
                        <div class='list_r_title_text3a'>
                            <img src='${pageContext.request.contextPath}/images/page_down_gray.gif'/>
                        </div>
                    </c:if>
                    <!--分页导航结束-->
                </div>
            </div>

            <!--商品条目开始-->
            <c:forEach items="${page.list}" var="page">
                <div class="list_r_line"></div>
                <div class="clear"></div>
                <div class="list_r_list">
							<span class="list_r_list_book"><a name="link_prd_img" href='#'>
								<img src="${pageContext.request.contextPath}/productImages/${page.image}"> </a> </span>
                    <h2>
                        <a name="link_prd_name" href='#'>${page.name}</a>
                    </h2>
                    <h3>
                        顾客评分：100
                    </h3>
                    <h4 class="list_r_list_h4">
                        作 者:
                        <a href='#' name='作者'>${page.author}</a>
                    </h4>
                    <h4>
                        出版社：
                        <a href='#' name='出版社'>人民邮电出版社</a>
                    </h4>
                    <h4>
                        出版时间：2009-01-01
                    </h4>
                    <h5>
                            ${page.manage}
                    </h5>
                    <div class="clear"></div>
                    <h6>
                        <span class="del">￥${page.price}</span>
                        <span class="red">￥${page.dangPrice}</span>
                        节省：${page.price-page.dangPrice}
                    </h6>
                    <span class="list_r_list_button"> </span>>
                    <a href="#">
                        <img src='../images/buttom_goumai.gif'/> </a>
                    <span id="cartinfo"></span>

                </div>
                <div class="clear"></div>

            </c:forEach>

            <!--商品条目结束-->

            <div class="clear"></div>
            <div id="divBottomPageNavi" class="fanye_bottom">
            </div>

        </div>
        <!--图书列表结束-->

    </div>
    <!--中栏结束-->
    <div class="clear"></div>
</div>

<!--页尾开始 -->
<%@include file="../common/foot.jsp" %>
<!--页尾结束 -->

<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.11.1.js"></script>
<script type="text/javascript">
    var sum = 0
    $(".quzhi").each(function (i, obj) {
        var c = $(obj).html();
        //alert(c);
        sum += parseInt(c)
        //console.log(c)
    })
    //alert(sum)
    $("#sum").html(sum)
</script>
</body>
</html>